<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>FabGL: fabgl::PS2Controller::begin</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">FabGL
   </div>
   <div id="projectbrief">ESP32 Display Controller and Graphics Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classfabgl_1_1_p_s2_controller_a34ef326505222b2b60d524e3c90455e4.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="contents">
<a id="a34ef326505222b2b60d524e3c90455e4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a34ef326505222b2b60d524e3c90455e4">&#9670;&nbsp;</a></span>begin() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::PS2Controller::begin </td>
          <td>(</td>
          <td class="paramtype">gpio_num_t&#160;</td>
          <td class="paramname"><em>port0_clkGPIO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpio_num_t&#160;</td>
          <td class="paramname"><em>port0_datGPIO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpio_num_t&#160;</td>
          <td class="paramname"><em>port1_clkGPIO</em> = <code>GPIO_UNUSED</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpio_num_t&#160;</td>
          <td class="paramname"><em>port1_datGPIO</em> = <code>GPIO_UNUSED</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes PS2 device controller. </p>
<p>Initializes the PS2 controller assigning GPIOs to DAT and CLK lines.</p>
<p>Because PS/2 ports are handled by the ULP processor, just few GPIO ports are actually usable. They are: GPIO_NUM_2, GPIO_NUM_4, GPIO_NUM_12 (with some limitations), GPIO_NUM_13, GPIO_NUM_14, GPIO_NUM_15, GPIO_NUM_25, GPIO_NUM_26, GPIO_NUM_27, GPIO_NUM_32 and GPIO_NUM_33.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">port0_clkGPIO</td><td>The GPIO number of Clock line for PS/2 port 0. </td></tr>
    <tr><td class="paramname">port0_datGPIO</td><td>The GPIO number of Data line for PS/2 port 0. </td></tr>
    <tr><td class="paramname">port1_clkGPIO</td><td>The GPIO number of Clock line for PS/2 port 1 (GPIO_UNUSED to disable). </td></tr>
    <tr><td class="paramname">port1_datGPIO</td><td>The GPIO number of Data line for PS/2 port 1 (GPIO_UNUSED to disable). </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_others_2_keyboard_studio_2_keyboard_studio_8ino-example.html#a9">Others/KeyboardStudio/KeyboardStudio.ino</a>, <a class="el" href="_others_2_mouse_studio_2_mouse_studio_8ino-example.html#a3">Others/MouseStudio/MouseStudio.ino</a>, <a class="el" href="_s_s_d1306__o_l_e_d_2128x64_2_network_terminal_2_network_terminal_8ino-example.html#a17">SSD1306_OLED/128x64/NetworkTerminal/NetworkTerminal.ino</a>, <a class="el" href="_s_s_d1306__o_l_e_d_2128x64_2_r_t_clock_2_r_t_clock_8ino-example.html#a19">SSD1306_OLED/128x64/RTClock/RTClock.ino</a>, <a class="el" href="_s_s_d1306__o_l_e_d_2128x64_2_u_i_2_u_i_8ino-example.html#a4">SSD1306_OLED/128x64/UI/UI.ino</a>, <a class="el" href="_s_t7789__t_f_t_2240x240_2_file_browser_2_file_browser_8ino-example.html#a2">ST7789_TFT/240x240/FileBrowser/FileBrowser.ino</a>, <a class="el" href="_v_g_a_2_altair8800_2_altair8800_8ino-example.html#a23">VGA/Altair8800/Altair8800.ino</a>, <a class="el" href="_v_g_a_2_ansi_terminal_2_ansi_terminal_8ino-example.html#a6">VGA/AnsiTerminal/AnsiTerminal.ino</a>, <a class="el" href="_v_g_a_2_audio_2_audio_8ino-example.html#a2">VGA/Audio/Audio.ino</a>, <a class="el" href="_v_g_a_2_classic_racer_2_classic_racer_8ino-example.html#a3">VGA/ClassicRacer/ClassicRacer.ino</a>, <a class="el" href="_v_g_a_2_direct_v_g_a__el_muro_2_direct_v_g_a__el_muro_8ino-example.html#a5">VGA/DirectVGA_ElMuro/DirectVGA_ElMuro.ino</a>, <a class="el" href="_v_g_a_2_file_browser_2_file_browser_8ino-example.html#a2">VGA/FileBrowser/FileBrowser.ino</a>, <a class="el" href="_v_g_a_2_graphical_user_interface_2_graphical_user_interface_8ino-example.html#a2">VGA/GraphicalUserInterface/GraphicalUserInterface.ino</a>, <a class="el" href="_v_g_a_2_hardware_test_2_hardware_test_8ino-example.html#a7">VGA/HardwareTest/HardwareTest.ino</a>, <a class="el" href="_v_g_a_2_loopback_terminal_2_loopback_terminal_8ino-example.html#a10">VGA/LoopbackTerminal/LoopbackTerminal.ino</a>, <a class="el" href="_v_g_a_2_mouse_on_screen_2_mouse_on_screen_8ino-example.html#a6">VGA/MouseOnScreen/MouseOnScreen.ino</a>, <a class="el" href="_v_g_a_2_multitasking_c_p_m_2_multitasking_c_p_m_8ino-example.html#a8">VGA/MultitaskingCPM/MultitaskingCPM.ino</a>, <a class="el" href="_v_g_a_2_network_terminal_2_network_terminal_8ino-example.html#a24">VGA/NetworkTerminal/NetworkTerminal.ino</a>, <a class="el" href="_v_g_a_2_space_invaders_2_space_invaders_8ino-example.html#a19">VGA/SpaceInvaders/SpaceInvaders.ino</a>, and <a class="el" href="_v_g_a_2_v_i_c20_2_v_i_c20_8ino-example.html#a17">VGA/VIC20/VIC20.ino</a>.</dd>
</dl>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>fabgl</b></li><li class="navelem"><a class="el" href="classfabgl_1_1_p_s2_controller.html">PS2Controller</a></li>
    <li class="footer">Generated on Tue Dec 8 2020 17:27:26 for FabGL by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
  </ul>
</div>
</body>
</html>
